import 'package:equatable/equatable.dart';
import 'package:mobile_app.core/core/domain/entities/dialect.dart';

class PronunciationSettings extends Equatable {
  const PronunciationSettings({
    required this.dialect,
    required this.speechRate,
    required this.amVoiceTitle,
    required this.brVoiceTitle,
  });

  final Dialect dialect;
  final double speechRate;
  final String? amVoiceTitle;
  final String? brVoiceTitle;

  @override
  List<Object?> get props {
    return [
      dialect,
      speechRate,
      amVoiceTitle,
      brVoiceTitle,
    ];
  }

  PronunciationSettings copyWith({
    Dialect Function()? dialect,
    double Function()? speechRate,
    String? Function()? amVoiceTitle,
    String? Function()? brVoiceTitle,
  }) {
    return PronunciationSettings(
      dialect: dialect == null ? this.dialect : dialect(),
      speechRate: speechRate == null ? this.speechRate : speechRate(),
      amVoiceTitle: amVoiceTitle == null ? this.amVoiceTitle : amVoiceTitle(),
      brVoiceTitle: brVoiceTitle == null ? this.brVoiceTitle : brVoiceTitle(),
    );
  }
}
